package com.bit.ioc.controller;

import com.bit.ioc.modle.DbTypes;
import com.bit.ioc.modle.Person;
import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;

@Controller
public class YmlController {
    @Value("${my.key1}")
    private String key1;
    @Value("{my.key2}")
    private String key2;
    @Value("${my.key3}")
    private String key3;
    @Autowired
    private Person person;
    @Autowired
    private DbTypes dbTypes;
    @PostConstruct
    public void init2(){
        System.out.println(key1);
        System.out.println(key2);
        System.out.println(key3);
        System.out.println(person);
        System.out.println(dbTypes);
    }

}
